<template>
  <div class="resourceCollection background">
    <el-breadcrumb separator-class="el-icon-arrow-right" style="margin-bottom:10px;">
      <el-breadcrumb-item><img style="width: 16px;vertical-align: middle;margin-right: 5px" src="@/assets/indexPage/location.png"/> 我的任务</el-breadcrumb-item>
      <el-breadcrumb-item>
        <span style="font-weight:600;">
           数据采集任务
        </span>
      </el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      <el-row>
        <el-form ref="form" :inline="true" :model="form" class="searchLine" label-width="100px">
            <el-form-item label="单位名称" class="searchItem">
              <el-select v-model="form.taskStatus" size="small" placeholder="请选择任务状态" style="width:230px;" clearable>
              </el-select>
            </el-form-item>
            <el-form-item label="场站名称" class="searchItem">
              <el-select v-model="form.taskStatus" size="small" placeholder="请选择任务编号" style="width:230px;" clearable>
              </el-select>
            </el-form-item>
            <el-form-item label="任务编号" class="searchItem">
              <el-select v-model="form.taskStatus" size="small" placeholder="请选择任务编号" style="width:230px;" clearable>
              </el-select>
            </el-form-item>
            <el-form-item label="采集时间" class="searchItem">
              <el-date-picker
                v-model="form.inspectDay"
                size="small"
                type="daterange"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              >
              </el-date-picker>
            </el-form-item>

        </el-form>
      </el-row>
      <el-row style="text-align:right;">
        <el-button type="primary" icon="el-icon-search" size="small" @click="listSearch">查询</el-button>
        <el-button size="small" @click="reset">重置</el-button>
      </el-row>
    </el-card>
    <el-row style="margin-top:10px;">
      <el-table
       :data="tableData"
       size="small"
       tooltip-effect="dark"
       ref="table"
       :stripe="true"
       :border="true"
       style="width: 100%;"
       max-height="550">
       <el-table-column
         label="采集时间"
         :resizable="false"
         prop="companyName"
         show-overflow-tooltip
         >
       </el-table-column>
       <el-table-column
         prop="stationName"
         show-overflow-tooltip
         :resizable="false"
         label="数据来源">
       </el-table-column>
       <el-table-column
         prop="inspectTaskCode"
         show-overflow-tooltip
         :resizable="false"
         label="数据类型">
       </el-table-column>
        <el-table-column
          prop="inspectDay"
          show-overflow-tooltip
          :resizable="false"
          width="150"
          label="数据路径">
        </el-table-column>
       <el-table-column
         show-overflow-tooltip
         :resizable="false"
         label="采集进度">
       </el-table-column>
       <el-table-column
         show-overflow-tooltip
         :resizable="false"
         label="查看数据">
       </el-table-column>
       <el-table-column
         show-overflow-tooltip
         :resizable="false"
         label="场站名称">
       </el-table-column>
       <el-table-column
         show-overflow-tooltip
         :resizable="false"
         label="任务编号">
       </el-table-column>
      </el-table>
    </el-row>
    <el-row class='pagination'>
      <el-pagination
        background
        :current-page.sync="currentPage"
        :page-size="pageSize"
        @current-change="handleCurrentChange"
        layout="total, prev, pager, next, jumper"
        :total="total">
      </el-pagination>
      <!-- @size-change="handleSizeChange"
      :page-sizes="[100, 200, 300, 400]"
       sizes, -->
    </el-row>
  </div>
</template>
<script>
  export default {
    name: 'resourceCollection',
    data: () => ({
      form: {
        taskStatus: '',
        type: []
      },
      currentPage: 1,
      pageSize: 10,
      total: 0,
      tableData: [
        {},
        {}
      ],
      subTableData: [],
      tree: [],
    }),
    methods: {
      listSearch() {},
      getList() {},
      reset() {},
      addNewTask() {
        this.dialogFormVisible = true
      },
      handleChange(file, fileList) {
        this.file = file.raw
      },
      handleRemove(file, fileList) {
        console.log(file, fileList, 'handleRemove');
      },
      handlePreview(file) {
        console.log(file, 'handlePreview');
      },
      handleCurrentChange(currentPage) {
        this.currentPage = currentPage
        this.getList()
      }
    }
  }
</script>
<style lang="scss">
.background{
  /*background-color: rgba(0,58,102,0.6);*/
  padding:10px 20px;
}
.resourceCollection{
  .searchLine{
    .searchItem{
      display: inline-block;
      vertical-align: top;
    }
    .el-form-item{
      margin-bottom: 3px !important;
    }
    .bigItem{
      width: 100%;
    }
  }
  .pagination{
    text-align: center;
    margin-top: 20px;
  }
  .el-dialog__body{
    padding: unset;
  }
  .title{
    font-weight: bold;
    color: #3977F3;
    background:rgba(57, 119, 243, .1);
    line-height:40px;
    padding-left: 21px;
    margin-bottom: 10px;
  }
  .pagination{
    text-align: center;
  }
}
</style>
